package com.tjsinfo.tjsoa.documentationflow.xingzhengfawen.action;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.json.JSONArray;
import org.json.JSONObject;

import com.tjsinfo.tjsoa.documentationflow.xingzhengfawen.bo.ITXingzhengfawenNeirongBO;
import com.tjsinfo.tjsoa.system.bo.ISystemUserBo;
import com.tjsinfo.tjsoa.system.vo.TSystemUser;

public class SelectQianFaListAction extends Action{
	private ITXingzhengfawenNeirongBO xingzhengfawenNeirongBO;
	private ISystemUserBo systemUserBo;
	
	
	








	public ISystemUserBo getSystemUserBo() {
		return systemUserBo;
	}






	public void setSystemUserBo(ISystemUserBo systemUserBo) {
		this.systemUserBo = systemUserBo;
	}






	public ITXingzhengfawenNeirongBO getXingzhengfawenNeirongBO() {
		return xingzhengfawenNeirongBO;
	}






	public void setXingzhengfawenNeirongBO(
			ITXingzhengfawenNeirongBO xingzhengfawenNeirongBO) {
		this.xingzhengfawenNeirongBO = xingzhengfawenNeirongBO;
	}






	@Override
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		// TODO Auto-generated method stub
		List<TSystemUser> list = xingzhengfawenNeirongBO.selectTsystemUserByUserIdAndDuty("总经理");
	
		//list.addAll(dangweishujilist);
		
		JSONArray array = new JSONArray();
		for (TSystemUser systemUser : list) {
			JSONObject object = new JSONObject(systemUser);
			array.put(object);
		}
		response.getWriter().print(array);
		return null;
	}
	
}

